﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using SFP;
using SFP.Input;
using HamsterDelivery.Menus.Options;

namespace HamsterDelivery.Menus
{
    public class StartMenu : Menu
    {
        public StartMenu(HamsterGame game)
        {
            Option newGame = new NewGameOption(game, this, 410, 375);
            Option loadGame = new LoadGameOption(game, this, 409, 416);
            Option options = new OptionsOption(game, this, 408, 455);
            Option quitGame = new QuitGameOption(game, this, 407, 495);
            Option info = new InfoOption(game, this, 250, 413);

            newGame.UpOption = quitGame;
            newGame.DownOption = loadGame;
            newGame.LeftOption = info;

            loadGame.UpOption = newGame;
            loadGame.DownOption = options;
            loadGame.LeftOption = info;

            options.UpOption = loadGame;
            options.DownOption = quitGame;
            options.LeftOption = info;

            quitGame.UpOption = options;
            quitGame.DownOption = newGame;
            quitGame.LeftOption = info;

            info.RightOption = newGame;

            DefaultOption = newGame;
        }

        public override void update(KeyboardState keyStates)
        {
            ActiveOption.update(keyStates);
        }

        public override void draw(Graphics g)
        {
            g.DrawImage(Resources.B_MAIN_MENU, new Point(0, 0));
            ActiveOption.draw(g);
        }
    }
}
